home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Dev / GNU-TILE-FORTH.lha / src / Makefile < prev    next >
Makefile  |  1992-05-23  |  3KB  |  112 lines

  1. # NAME
  2. #    Dmakefile - for the tile forth environment
  3. # SYNOPSIS
  4. #    dmake [option]
  5. # DESCRIPTION
  6. #    General compilation coordinator for the threaded interpreter language
  7. #    environment (TILE). Allow compilation in different modes to simplify
  8. #    program development; compiling, recompiling, debugging, profiling, and
  9. #    benchmarks.
  10. # OPTIONS
  11. #    new
  12. #        Cleans up and compiles a fresh version.
  13. #    opt
  14. #        Use all optimization tricks known by cc.
  15. #    dbx
  16. #        Recompile for debugging with dbx.
  17. #    gprof
  18. #        Recompile for profiling with gprof.
  19. #    lint
  20. #        Verify the source code using lint.
  21. #    bench
  22. #        Some benchmarks to evaluate this threading method
  23. # SEE ALSO
  24. #    dmake(1), cc(1), touch(1), dbx(1), grof(1), lint(1), time(1)
  25. # AUTHOR
  26. #    Copyright (C) 1990, Mikael R.K. Patel
  27. #    Computer Aided Design Laboratory (CADLAB)
  28. #    Department of Computer and Information Science
  29. #    Linkoping University
  30. #    S-581 83 LINKOPING
  31. #    SWEDEN
  32. #    Email: mip@ida.liu.se
  33. # HISTORY
  34. #    Started on:     01 April 1989
  35. #    Last updated on: 03 September 1990
  36. #
  37.  
  38. # C-compiler 
  39. CC = gcc
  40.  
  41. # Source and object files
  42. SRC = kernel.c io.c error.c memory.c forth.c
  43. VOCS = compiler.v exceptions.v locals.v memory.v queues.v multi-tasking.v string.v float.v
  44. OBJS = kernel.o io.o error.o memory.o
  45. HEADS =  kernel.h io.h error.h memory.h
  46.  
  47. # Template for your machine dependencies and libraries
  48. # LIBS = -lyourlibrary
  49. CFLAGS = -DAMIGA
  50.  
  51.  
  52. forth: $(OBJS) forth.o
  53.     $(CC) $(CFLAGS) -o $@ $(OBJS) forth.o $(LIBS)
  54.  
  55.  
  56. # Object code dependencies
  57. forth.o: $(HEADS)
  58.  
  59. kernel.o: $(HEADS) $(VOCS)
  60.  
  61. memory.o: $(HEADS)
  62.  
  63. error.o:  $(HEADS)
  64.  
  65. io.o:     $(HEADS)
  66.  
  67.  
  68. # Cleans up and compiles a new version
  69. new:
  70.     
  71.     dmake forth
  72.  
  73.  
  74. # Compiles with all optimization tricks    
  75. opt:
  76.     
  77.     dmake forth "CFLAGS=$(CFLAGS) -O2"
  78.  
  79.  
  80. # Compiles for debugging with "dbx" or "dbxtool"
  81. dbx:
  82.     
  83.     dmake forth "CFLAGS=$(CFLAGS) -g"
  84.  
  85.  
  86. # Compiles for profiling with "gprof"
  87. gprof: 
  88.     
  89.     dmake forth "CFLAGS=$(CFLAGS) -DPROFILE -Bstatic -pg"
  90. #    forth 
  91. #    gprof forth
  92.  
  93. # Verify the source code
  94. lint:
  95.     lint $(CFLAG) -DLINT $(SRC)
  96.  
  97.  
  98. # Run the benchmarks
  99. bench:
  100.     time forth byte-sieve.tst -s byte-sieve
  101.     time forth colburn-sieve.tst -s colburn-sieve
  102.     time forth fibonacci.tst -s recursive-fib
  103.     time forth fibonacci.tst -s tail-recursive-fib
  104.     time forth bubble-sort.tst -s bubble-sort
  105.     time forth bubble-sort.tst -s bubble-sort-with-flag
  106.     time forth tree-sort.tst -s tree-sort
  107.     time forth matrix-mult.tst -s matrix-mult
  108.     time forth permutations.tst -s permutations
  109.     time forth towers-of-hanoi.tst -s towers-of-hanoi
  110.     time forth task-sieve.tst -s task-sieve
  111.     time forth minimal.f83 -s bye
  112.